<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<h:form>

	<a4j:region id="regiaoBarraSuperior" renderRegionOnly="true">
		<div class="div_top">
			<a4j:status id="processando"
				onstart="#{rich:component('panelStatus')}.show(); return false;"
				onstop="#{rich:component('panelStatus')}.hide()" />
			<h:graphicImage library="logo.png" url="/resources/images/logo.png"
				width="100%" height="152"></h:graphicImage>


			<rich:popupPanel id="panelStatus" autosized="true">

				<h:panelGrid columns="3">


					<h:outputText value="Carregando…" />


				</h:panelGrid>

			</rich:popupPanel>

		</div>
		
		<nav id="menu-wrap">
			<div id="menu-trigger">Menu</div>
			<ul id="menu">
				
				<li><h:link outcome="index">Principal</h:link></li>
				<li> <h:outputLink rendered="#{!userSession.logged}" hreflang="cadastro.xhtml" value="cadastro.xhtml">Cadastre-se</h:outputLink></li>
				<li><h:link outcome="anuncie">Anuncie</h:link></li>
				<li><h:link outcome="contato">Contato</h:link></li>
				<li><a href="">Categorias</a>
					<ul>
						<a4j:repeat value="#{categoriaMB.categoriasAtivas}" var="categoria">
							<li>
								<h:link  outcome="index">
									<f:param name="IdCategoria" value="#{categoria.idCategoria}" />
								#{categoria.descricao}
								</h:link>
							</li>
						</a4j:repeat>
					</ul>
				</li>
				<li><h:outputLink rendered="#{userSession.administrador}" hreflang="cadastro.xhtml" value="">Administrador</h:outputLink>
					<ul>
						<li><h:link rendered="#{userSession.administrador}"  outcome="usuario">Usuario</h:link></li>			
						<li><h:link rendered="#{userSession.administrador}" outcome="categoria">Categoria</h:link></li>		
						<li><h:link rendered="#{userSession.administrador}" outcome="enquete">Enquete</h:link></li>
						<li><h:link rendered="#{userSession.administrador}" outcome="noticia">Noticia</h:link></li>			
					</ul>
				</li>
				
				<div class="botaoPesquisar">
					<h:inputText style="border: 0;	margin-top: 0;	margin-bottom: 0;" value="#{noticiaMB.nomeNoticia}"></h:inputText>
					<h:commandButton style="margin-right: 0;margin-top: 0;" value="Buscar" action="#{noticiaMB.buscarNoticia}" render="@form"></h:commandButton>
				</div>
			</ul>
			
		</nav>

	</a4j:region>
	
	</h:form>
</ui:composition>